home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
...taking it to the Macs!
/
...taking it to the Macs!.iso
/
Extras
/
ActiveX Mac SDK
/
ActiveX SDK
/
Container Common
/
CArgumentParser.h
< prev
next >
Wrap
Text File
|
1997-01-03
|
958b
|
42 lines
// ===========================================================================
// CArgumentParser.h ©1996 Microsoft Corporation. All rights reserved.
// ===========================================================================
typedef enum
{
Alpha = 0, Numeric, WhiteSpace, Assignment, Quote, Unknown, EOF, CharTypeCount
}
chartype;
typedef enum
{
AddToBuffer = 0, TermArgName, TermArgValue, None, Error
}
parseraction;
typedef enum
{
WaitArgName = 0, BuildArgName, WaitAssign, WaitArgValue, BuildArgVal, BuildArgValLit, Undefined,
StateCount, Stop = WaitArgName
}
parserstate;
class CArgumentParser
{
public:
CArgumentParser(void);
~CArgumentParser(void);
void Reset(void);
Boolean ProcessChar(char c);
Boolean GetArguments(Ptr *ArgBuffer, char **ArgNames[], char **ArgValues[], short *ArgCount);
protected:
private:
Handle Buffer;
char InputBuffer[256];
Uint16 InputBufferCount;
parserstate CurrentState;
};